package interfaces;

import gameclasses.Map;

/**
 * Interface which should be implemented by all Classes which are able to shoot
 * 
 * @author Alex, Tim
 * @since 0.3.0
 * @version 0.4.1
 */
public interface IShooter {

	/**
	 * @return the AttackPoints of the {@link IShooter}
	 */
	int getAttackPoints();
	
	/**
	 * 
	 * @return The maximum distance, which the {@link IShooter} is able to shoot
	 */
	double getShootRange();
	
	/**
	 * This Method should call the Hit Method of the passed {@link IHitable}, 
	 * additionally it should implement everything that happens to the {@link IShooter} when shooting
	 * 
	 * @param unit {@link IHitable} which is shot by the {@link IShooter}
	 * @return
	 */
	int shoot(IHitable unit);
	
	/**
	 * This Method should call the GetDistanceBetweenPoints Method of {@link Map}, with the Positions of 
	 * the passed {@link IHitable} and the Position of itself
	 * 
	 * @param target The {@link IHitable} to which the distance should be calculated
	 * @return The distance to the passed {@link IHitable}
	 */
	double getDistanceTo(IHitable target);
	
	/**
	 * 
	 * @return The amount of ammonition of this {@link IShooter}
	 */
	int getAmmoCount();
	
	/**
	 * This Method should resupply the {@link IShooter}. If the passed amount of ammonition is larger than
	 * the {@link IShooter} can hold, the {@link IShooter} only loads until it is full and returns this amount
	 * 
	 * @param amount The maxium amount of ammonition which could be loaded to this {@link IShooter}
	 * @return the Amount of ammonition which was loaded absolutly
	 */
	int resupply(int amount);
}
